package com.blb.controller;

import com.blb.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @GetMapping
    public String demo1(){
        return "哈哈哈";
    }

    @ResponseBody
    @RequestMapping("user")
    public User hello2(){
        User user = new User();
        user.setId(1);
        user.setName("张三");
        user.setPwd("123");
        user.setSex('男');
        user.setTel("123456");
        return user;
    }

}
